package com.yhao.controller;

import com.yhao.bean.WelcomeBean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class WelcomeController {
    private WelcomeBean welcomeBean;

    public WelcomeController(WelcomeBean welcomeBean) {
        welcomeBean.setCode(1);
        welcomeBean.setMassage("OK");
        welcomeBean.setData("Welcome to Smart Check In!");
        this.welcomeBean = welcomeBean;
    }


    @GetMapping("/welcome")
    public WelcomeBean welconme() {

        return welcomeBean;
    }

}
